package com.powell.health.activity;

import android.app.Activity;
import android.os.Bundle;
import com.powell.health.fragment.ItemListFragment;

/**
 * Created with IntelliJ IDEA.
 * User: tpowell
 * Date: 1/1/13
 * Time: 3:22 PM
 * To change this template use File | Settings | File Templates.
 */
public class ItemListActivity extends AbstractHealthActivity {

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        if (isLandScape()) {
            return;
        }
        createNewItemListFragment(savedInstanceState);
    }

    private void createNewItemListFragment(Bundle savedInstanceState) {
        if (savedInstanceState == null) {
            ItemListFragment itemList = new ItemListFragment();
            itemList.setArguments(getIntent().getExtras());
            getFragmentManager().beginTransaction().add(android.R.id.content, itemList).commit();
        }
    }


}

